<div class="registration-container">
    <div class="registration-header">
        <div class="post-ad-header-text">
            Posting your ad is as easy as 1-2-3!
        </div>
        <div class="post-step-image">
          <%=image_tag "post-step2.jpg", :border=>0,:alt=>"Step 2 of 3" -%>
        </div>
    </div>

    <div class="registration-inner">
      
  <%if @user.status==0 || (@user.mobile_no)!=''%>
  <%=render :partial=>"verification_box" -%>
  <%end -%>
        <div class="post-inner-details">
              <%form_for :advertisment, @advertisment, :url => {:controller => "advertisments",  :action => "post_free_ad" ,:step=>3,:email=>@email} , :html => { :multipart => true } do |form| %>

            Step 2: Describe your requirements to get better responses.
        </div>
		<!--Books buy-sell forms  -->
        <!--Books-for-sale-course-books -->
       <div class="books-for-sale-course-books">
           <div class="registration-user-fields">
                <div class="registration-field-text">
                    *Ad Title:
                </div>
                <div class="registration-field-value">
                    <div class="registration-field-input-box">
                    	<%=form.text_field  :title ,:size => 40 , :onfocus=>"show_sample_text('title');" , :onblur=>"hide_sample_text('title');" , :onkeyup=>"document.getElementById('count').innerHTML = this.value.length;" -%>
                        <span id="title"class="sampletext"><%=  $sample_text["title"] %></span>
                	</div>
                    <div class="registration-field-input-detail">
                    	0 Characters Typed (Min. 20 and Max. 100 characters (<span id="count">0</span>/100))
                    </div>
                </div>
	        </div>
            <div class="registration-user-fields">
                <div class="registration-field-text">
                    *Ad Description:
                </div>
                <div class="registration-field-value">
                    <div class="registration-field-input-box">
                    	<%= form.text_area  :description , :size => "50x7"  , :onfocus=>"show_sample_text('description');" , :onblur=>"hide_sample_text('description');",:onkeyup=>"document.getElementById('count2').innerHTML = this.value.length;" %>
                        <span id="description"class="sampletext"><%=  $sample_text["description"] %></span>
                    </div>
                    <div class="registration-field-input-detail">
                    	0 Characters Typed (Min. 40 characters (<span id="count2">0</span>/1000))
                    </div>
                </div>
        	</div>
            <div class="registration-user-fields">
                <div class="registration-field-text">
                    *Pincode:
                </div>
                <div class="registration-field-value">
                  <input type="text" onblur="<%=remote_function(:url => 'pin_code', :with => "'pincode='+this.value",:update=>"zila_talluk")-%>"
                </div>
            </div>
            <div class="registration-user-fields">
                <div class="registration-field-text">
                    *Address(City,Locality):
                </div>
                <div class="registration-field-value" id="zila_talluk">
                     <%= form.text_field  :location , :size => 20 , :onfocus=>"show_sample_text('location');" , :onblur=>"hide_sample_text('location');"%>
                     <span id="location"class="sampletext"><%=  $sample_text["location"] %></span>
                </div>
            </div>
            <div class="registration-user-fields">
                <div class="registration-field-text">
                    Near:
                </div>
                <div class="registration-field-value">
                    <input type="text" maxlength="40" value="University / College" class="ad-details-input-box-1"/>
                </div>
            </div>



            <%unless @sub_category.advertisment_form_field.nil? -%>
                <%@sub_category.advertisment_form_field.each do |form_field| -%>
             <div class="registration-user-fields">
                <div class="registration-field-text">
                   <%=form_field[:label]-%>:
                </div>
                <div class="registration-field-value">
                 <%=send(form_field[:input_type][0], "advertisment_attributes[#{form_field[:input_type][1]}]", form_field[:input_type][2])-%>
                </div>
            </div>
               <%end -%>
              <%end -%>
            
            <div class="registration-user-fields">
                <div class="registration-field-text">
                    Photos or Documents:
                </div>
                <div class="registration-field-value">
                	<div class="registration-field-input-box">
                    	           <div class="upload-photos-input">
                                   <%=file_field(:upload,:file1) -%>
                                   <%=file_field(:upload,:file2) -%>
                                   <%=file_field(:upload,:file3) -%>
                                   <%=file_field(:upload,:file4) -%>
                                  </div>
                	</div>
                    <div class="registration-field-input-detail">
                    	Maximum filesize 1024KB
                    </div>
                </div>
            </div>
        </div>
        <div class="registration-button">

              <%=image_submit_tag("proceed-button.jpg")%>
              <%= hidden_field_tag(:advertisment_record_id,@advertisment.id) -%>
              <%if ! @nonstudent %>
                <%=hidden_field_tag(:university_id,@university.id) -%>
              <%end -%>
              <%=hidden_field_tag(:category_id,@sub_category.category_id) -%>
              <%=hidden_field_tag(:sub_category_id,@sub_category.id) -%>
        </div>
     
    </div>
    <%end -%>
</div>
